package com.sky.wsp.rabbitmq.consumer;

import com.sky.wsp.rabbitmq.exchange.DirectExchangeConfig;
import com.sky.wsp.rabbitmq.exchange.FanoutExchangeConfig;
import com.sky.wsp.rabbitmq.po.MqMessage;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.io.IOException;


@Component
public class FanoutConsumer1 {
    @RabbitListener(queues = FanoutExchangeConfig.QUEUE_NAME_1)
    public void subscribe(MqMessage msg) {
        System.out.println("<==Fanout消费者1收到消息" + msg.toString());
    }
}
